package com.mm.cloud.sys.auth.core.token;

import com.mm.cloud.sys.auth.core.token.base.AuthenticateToken;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;


/**
 * 用户名密码身份认证
 *
 * @author mr
 * @since 2021-07-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "用户名密码身份认证")
public class UsernamePasswordAuthenticateToken extends AuthenticateToken {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "用户名不能为空")
    private String username;

    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "密码不能为空")
    private String password;

}
